package com.aaa.javaweb.servlet;

import com.aaa.javaweb.dao.TongjiDao;
import com.aaa.javaweb.until.LayTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
public class ShujtjController {
    @Autowired
    private TongjiDao tongjiDao;
    @RequestMapping("tongji")
    @ResponseBody
    public LayTable settongji(){
        List<Map> maps=tongjiDao.settongji();
        LayTable layTable = new LayTable(maps.size(), maps);
        return layTable;
    }

}
